-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s3 module terraform warnings refactor #302
Conversation
…archives/tdr-terraform-modules into TDRD-607-Fix-terraform-warnings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Added some minor comments. Thanks.
s3/main.tf
Outdated
@@ -55,76 +71,84 @@ resource "aws_s3_bucket_notification" "log_bucket_notification" { | |||
} | |||
depends_on = [aws_s3_bucket_policy.log_bucket] | |||
} | |||
|
|||
# This module is to be deprecated and caused many terraform warnings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd just have a comment to say the module is to be deprecated.
…ACP, and WRITE_ACP permissions on the bucket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks
S3 module the resource aws_s3_bucket has attributes logging, lifecycle_rule, cors_rule ,acl andversioning that should be in separate resources. The grants should be defined in the iam policy
Refactoring the grants policy is not as simple as other resource changes. As the tdr-terrafom-module/s3 is to be deprecated a partial solution that covers the only case where canonical-user-grants variable has been used is provided so the warnings will disappear. The code is commented to explain the variable use/limitation
The vpc = true argument used to indicate that the EIP was associated with a VPC, but since AWS introduced this as the default behaviour, the attribute is redundant and has been removed from newer versions of the Terraform AWS Provider.